package presale_house.handler;

import presale_house.entity.ClientDo;
import presale_house.service.ClientService;
import presale_house.service.HouseService;
import presale_house.service.impl.ClientServiceImpl;
import presale_house.service.impl.HouseServiceImpl;
import presale_house.show.HouseList.HouseView;
import presale_house.show.HouseList.HouseViewTable;
import presale_house.show.MainView;
import presale_house.show.view.AddClientView;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class GotoHouseViewHandler implements ActionListener {
    private HouseView houseView;
    private MainView mainView;
    public GotoHouseViewHandler(MainView mainView){
        this.mainView=mainView;
    }
    @Override
    public void actionPerformed(ActionEvent e) {
        JButton jButton=(JButton) e.getSource();
        String text=jButton.getText();
        if("查看房屋".equals(text)){
            HouseService houseService=new HouseServiceImpl();
            new HouseView();
            mainView.dispose();
        }
    }
}
